package com.plm.frame.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.plm.frame.mapper.FenleiMapper;
import com.plm.frame.model.Fenlei;
import com.plm.frame.service.FenleiService;



@Service
@Transactional  //此处不再进行创建SqlSession和提交事务，都已交由spring去管理了。
public class FenleiServiceImpl implements FenleiService {
	
	@Resource
	private FenleiMapper mapper;

	@Override
	public List<Fenlei> selectFenlei(Integer pageIndex) {
		// TODO Auto-generated method stub
		return mapper.selectFenlei(pageIndex);
	}

	public List<Fenlei> selectFenleiAll() {
		// TODO Auto-generated method stub
		return mapper.selectFenleiAll();
	}

	@Override
	public void deleteFenlei(Fenlei fenlei) {
		// TODO Auto-generated method stub
		mapper.deleteFenlei(fenlei);
	}

	@Override
	public void addFenlei(Fenlei fenlei) {
		// TODO Auto-generated method stub
		mapper.addFenlei(fenlei);
	}

}
